<?php  
class ControllerProductViewAttribute extends Controller {
	private $error = array(); 

	public function index(){
		if (isset($this->request->get['product_id'])) {
			$product_id = (int)$this->request->get['product_id'];
		} else {
			$product_id = 0;
		}
		
		$this->load->model('catalog/product');
		$this->data['attribute_groups'] = array();
		$this->data['attribute_groups'] = $this->model_catalog_product->getProductAttributes($product_id);
		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/view_attribute.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/product/view_attribute.tpl';
		} else {
			$this->template = 'default/template/product/view_attribute.tpl';
		}
					
		$this->response->setOutput($this->render());
		
	}
}
?>